<?php

namespace App\Console\Commands\Fy;

use App\Service\Common\EmailService;
use Illuminate\Console\Command;

class ReceiveEmail extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'fy:receive_email';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '自动接收并读取新邮件';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     */
    public function handle()
    {
        $res = (new EmailService)->receiveEmail();
        dd($res);
    }
}
